﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Ev_OneChain.Controllers
{
    public class HomeController : Controller
    {
        static string strSMS = "http://front.chc.mobi/sms.php";

        //
        // GET: /Home/

        public ActionResult Index(string phone)
        {
            ViewBag.apid = "25536";
            ViewBag.insParam = phone;
            return View();
        }

        /// <summary>
        /// 发送验证码短信
        /// </summary>
        /// <param name="strMobile"></param>
        /// <returns></returns>
        public string sendCode(string strMobile,string code)
        {
            var codeStatus = new Service.sendHTTP().sendSMS(strMobile);
            Console.Write(codeStatus);
            return codeStatus;
        }

        /// <summary>
        /// 注册用户
        /// </summary>
        /// <param name="insPhone"></param>
        /// <param name="insCode"></param>
        /// <param name="insPwd"></param>
        /// <param name="insPwdQ"></param>
        /// <param name="insYQR"></param>
        /// <returns></returns>
        [HttpPost]
        public string saveRegister(string insPhone, string insCode, string insPwd, string insPwdQ, string insYQR) {
            //insYQR = "18888888888";
            var codeStatus = new Service.sendHTTP().sendRegister(insPhone, insPwd, insPwdQ, insYQR);
            Console.Write(123);
            return codeStatus;
        }
    }
}
